package com.bl.student.service.biz.apply;

import com.bl.student.dao.model.ApplyEntity;
import com.bl.student.dao.redis.model.UserInfo;
import com.bl.student.service.vo.DelBody;
import com.bl.student.service.vo.DelListBody;
import com.bl.student.service.vo.apply.ApplyAddVo;
import com.bl.student.service.vo.apply.ApplyAgreeVo;
import com.bl.student.service.vo.apply.ApplyListVo;

import com.bl.student.service.vo.apply.ApplyAddVo;
import com.bl.student.service.vo.chat.RoomAddVo;
import com.bl.student.service.vo.user.RoomUserInfo;
import com.bl.student.service.vo.user.UserSimpleInfoVo;
import org.springframework.data.domain.Pageable;

import java.math.BigDecimal;
import java.util.List;


public interface ApplyService {

//  api 、获取任务的所有申请记录并标记乙方是否申请
    ApplyListVo getApplyLists(String userid,String taskId,Pageable pageable );

//   api、获取发布的某个任务的所有申请记录
    ApplyListVo getTaskApplyLists( String taskId,Pageable pageable, UserInfo userInfo, int status);

//    manager 、根据甲方id、乙方id、taskid、时间区间筛选所有申请记录
    ApplyListVo getAllApplyLists(String partyaId, String partybId, String taskId,Pageable pageable  );

//    manager 删除单条申请记录
    void del(DelBody id);

//    manager 批量删除申请记录
    void delList(DelListBody idList);

    // 乙方申请加入一个task
    void apply(ApplyAddVo applyAddVo, String partybId);

    //乙方申请修改报价
    void modifyMoney(String applyId, BigDecimal money);

    // 甲方选择一个申请人执行一条task
    void agree(ApplyAgreeVo applyAgreeVo);

    // 甲方强制开始一个任务（仅限于群招）
    void forceOnline(DelBody taskId);

    // 获取乙方某个状态的申请记录
    List<ApplyEntity> getApplyListsByPartybAndStatus(String partbId, int status);

    //增加聊天室
    void addRoom(RoomAddVo roomAddVo);

    String getRoom(String partyaHxName,String partybHxName,String taskId);

    RoomUserInfo getUserInfoByRoom(String roomId);

    // 乙方已申请且通过列表
    List<UserSimpleInfoVo> getApplyListAgree(String taskId);
}
